package com.ruoyi.stock2.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock2.mapper.SearchFromEsChooseMapper;
import com.ruoyi.stock2.domain.SearchFromEsChoose;
import com.ruoyi.stock2.service.ISearchFromEsChooseService;
import com.ruoyi.common.core.text.Convert;

/**
 * 精挑细选的Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-08
 */
@Service
public class SearchFromEsChooseServiceImpl implements ISearchFromEsChooseService
{
    @Autowired
    private SearchFromEsChooseMapper searchFromEsChooseMapper;

    /**
     * 查询精挑细选的
     *
     * @param id 精挑细选的ID
     * @return 精挑细选的
     */
    @Override
    public SearchFromEsChoose selectSearchFromEsChooseById(Long id)
    {
        return searchFromEsChooseMapper.selectSearchFromEsChooseById(id);
    }

    /**
     * 查询精挑细选的列表
     *
     * @param searchFromEsChoose 精挑细选的
     * @return 精挑细选的
     */
    @Override
    public List<SearchFromEsChoose> selectSearchFromEsChooseList(SearchFromEsChoose searchFromEsChoose)
    {
        return searchFromEsChooseMapper.selectSearchFromEsChooseList(searchFromEsChoose);
    }

    /**
     * 新增精挑细选的
     *
     * @param searchFromEsChoose 精挑细选的
     * @return 结果
     */
    @Override
    public int insertSearchFromEsChoose(SearchFromEsChoose searchFromEsChoose)
    {
        return searchFromEsChooseMapper.insertSearchFromEsChoose(searchFromEsChoose);
    }

    /**
     * 修改精挑细选的
     *
     * @param searchFromEsChoose 精挑细选的
     * @return 结果
     */
    @Override
    public int updateSearchFromEsChoose(SearchFromEsChoose searchFromEsChoose)
    {
        return searchFromEsChooseMapper.updateSearchFromEsChoose(searchFromEsChoose);
    }

    /**
     * 删除精挑细选的对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSearchFromEsChooseByIds(String ids)
    {
        return searchFromEsChooseMapper.deleteSearchFromEsChooseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除精挑细选的信息
     *
     * @param id 精挑细选的ID
     * @return 结果
     */
    @Override
    public int deleteSearchFromEsChooseById(Long id)
    {
        return searchFromEsChooseMapper.deleteSearchFromEsChooseById(id);
    }

    @Override
    public int deleteSearchFromEsChooseByDate(Date createDate) {
        return searchFromEsChooseMapper.deleteSearchFromEsChooseByDate(createDate);
    }
}
